package cn.changgou;

import cn.changgou.entity.IdWorker;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Bean;
import tk.mybatis.spring.annotation.MapperScan;

@SpringBootApplication
@EnableEurekaClient //开启Eureka客户端
@MapperScan(basePackages = {"cn.changgou.dao"})
/*
* 开启通用Mapper的包扫描
* 注解包名：tk.mybatis.spring.annotation.MapperScan
* */
public class GoodsApplication {

    public static void main(String[] args) {
        SpringApplication.run(GoodsApplication.class, args);
    }

    /*IdWorker*/
    @Bean
    public IdWorker idWorker(){
        return new IdWorker(0, 0);
    }
}
